package com.gcph.zhuoba.app;

import android.annotation.TargetApi;
import android.app.Application;
import android.os.Build;

import com.gcph.zhuoba.util.SharePreferenceUtil;


@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class GcphApplication extends Application {
	private SharePreferenceUtil mSpUtil;
	public static final String SP_FILE_NAME = "gcph_msg_sp";
	private static GcphApplication mApplication;
	public synchronized static GcphApplication getInstance() {
		return mApplication;
	}

	@Override
	public void onCreate() {
		super.onCreate();
		mApplication = this;
		//CrashHandler.getInstance().init(this);
		//initData();
	}

	private void initData() {
		mSpUtil = new SharePreferenceUtil(this, SP_FILE_NAME);
	}


	public synchronized SharePreferenceUtil getSpUtil() {
		if (mSpUtil == null)
		{
			mSpUtil = new SharePreferenceUtil(this, SP_FILE_NAME);
		}
		return mSpUtil;
	}
}
